import { defineStore } from 'pinia'
import { ref } from 'vue'
export const useUserStore = defineStore('user', () => {
  const name = ref('')
  const age = ref(0)
  const setName = (name1: string) => {
    name.value = name1
  }
  const setAge = () => {
    age.value++
  }
  return {
    name,
    age,
    setName,
    setAge
  }
},{
    persist: true
})